package com.hmall.api.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("user-service")// 负载均衡服务器地址，Feign客户端
public interface UserClient {
    /**
     * 扣减余额
     * @param pw 支付密码
     * @param amount 支付金额
     */
    @PutMapping("/users/money/deduct")
    public void deductMoney(@RequestParam("pw") String pw, @RequestParam("amount") Integer amount);
}
